package com.cisdi.info.mh.dao.information;

import com.cisdi.info.simple.dto.base.PageDTO;
import com.cisdi.info.mh.entity.information.Information;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
@Component(value = "informationDao")
public interface InformationDao {

    public List<Information> findInformations(PageDTO pageDTO);

    public List<Information> findAllInformations();

    public List<Information> findAllInformationsWithIdName();

    public List<Information> findInformationsWithIdNameByName(@Param("informationName") String informationName);

    public Information findInformationsWithIdNameById(@Param(" informationId") Long informationId);

    public Long findInformationTotalCount(PageDTO pageDTO);

    public Information findInformation(@Param("informationId") Long informationId);

    //所有外键的Name都以加载
    public Information findInformationWithForeignName(@Param("informationId") Long informationId);

    public Integer saveInformation(Information information);

    public Integer updateInformation(Information information);

    public Integer deleteInformation(@Param("informationId") Long informationId);
}
